#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QLabel>
#include <QTime>
#include <QThread>
#include <uart.h>

#include <QObject>
#include "qcustomplot.h"

QT_BEGIN_NAMESPACE
namespace Ui {
class MainWindow;
}
QT_END_NAMESPACE
class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();

    void graph_init();
    void graph_update();

private slots:
   void timer_slot();
   void on_open_port_clicked();
private:
    Ui::MainWindow *ui;
    //
    QPointer<QCPGraph> mGraph1;
    QPointer<QCPGraph> mGraph2;
    QThread m_qthread;
    QTimer mDataTimer;
    uart m_uart;
    QLabel m_label;

};

#endif // MAINWINDOW_H
